package com.guaoran.source.spring.framework.demo.action;


import com.guaoran.source.spring.framework.annotation.Autowried;
import com.guaoran.source.spring.framework.annotation.Controller;
import com.guaoran.source.spring.framework.annotation.RequestMapping;
import com.guaoran.source.spring.framework.annotation.RequestParam;
import com.guaoran.source.spring.framework.demo.service.DemoService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping("/demo")
public class DemoAction {
	
	@Autowried
	private DemoService demoService;
	
	@RequestMapping("/query.json")
	public void query(HttpServletRequest req,HttpServletResponse resp,
		   @RequestParam("name") String name) {
		String result = demoService.get(name);
		System.out.println("DemoAction...result="+result);
	}
	

}
